package com.glSto.req;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;

/**
 * 工单创建请求DTO
 * 规则：所有字段默认"1"，外部传值直接覆盖
 */
@Data
public class WorkOrderRequestDTO {
    // 消息头实体（内部静态类）
    @Data
    public static class IsMsgHead {
        @JsonProperty("IM_GUID")
        private String IM_GUID = "1";
        @JsonProperty("SEND_TIME")
        private String SEND_TIME = "1";
        @JsonProperty("SENDER")
        private String SENDER = "1";
        @JsonProperty("SEND_CFID")
        private String SEND_CFID = "1";
        @JsonProperty("RECEIVER")
        private String RECEIVER = "1";
        @JsonProperty("RECEIVE_IFID")
        private String RECEIVE_IFID = "1";
        @JsonProperty("RECEIVE_METHOD")
        private String RECEIVE_METHOD = "1";
        @JsonProperty("SEND_SYSTEM_ID")
        private String SEND_SYSTEM_ID = "1";
        @JsonProperty("PROXY_ID")
        private String PROXY_ID = "1";
        @JsonProperty("MANDT")
        private String MANDT = "1";
        @JsonProperty("SEND_OPERATOR")
        private String SEND_OPERATOR = "1";
        @JsonProperty("SPRAS")
        private String SPRAS = "1";
    }

    // 子表实体：IT_METHODS
    @Data
    public static class Methods {
        @JsonProperty("REFNUMBER")
        private String REFNUMBER = "1";
        @JsonProperty("OBJECTTYPE")
        private String OBJECTTYPE = "1";
        @JsonProperty("METHOD")
        private String METHOD = "1";
        @JsonProperty("OBJECTKEY")
        private String OBJECTKEY = "1";
    }

    // 子表实体：IT_HEADER
    @Data
    public static class Header {
        @JsonProperty("ORDERID")
        private String ORDERID = "1";
        @JsonProperty("ORDER_TYPE")
        private String ORDER_TYPE = "1";
        @JsonProperty("PRIORITY")
        private String PRIORITY = "1";
        @JsonProperty("FUNCT_LOC")
        private String FUNCT_LOC = "1";
        @JsonProperty("EQUIPMENT")
        private String EQUIPMENT = "1";
        @JsonProperty("PLANPLANT")
        private String PLANPLANT = "1";
        @JsonProperty("BUS_AREA")
        private String BUS_AREA = "1";
        @JsonProperty("SHORT_TEXT")
        private String SHORT_TEXT = "1";
        @JsonProperty("MN_WK_CTR")
        private String MN_WK_CTR = "1";
        @JsonProperty("PLANT")
        private String PLANT = "1";
        @JsonProperty("PMACTTYPE")
        private String PMACTTYPE = "1";
        @JsonProperty("PLANGROUP")
        private String PLANGROUP = "1";
        @JsonProperty("REVISION")
        private String REVISION = "1";
        @JsonProperty("RESPCCTR")
        private String RESPCCTR = "1";
        @JsonProperty("FUNC_AREA")
        private String FUNC_AREA = "1";
        @JsonProperty("PROCESSING_GROUP")
        private String PROCESSING_GROUP = "1";
        @JsonProperty("WBS_ELEM")
        private String WBS_ELEM = "1";
        @JsonProperty("START_DATE")
        private String START_DATE = "1";
        @JsonProperty("FINISH_DATE")
        private String FINISH_DATE = "1";
        @JsonProperty("BASICSTART")
        private String BASICSTART = "1";
        @JsonProperty("BASIC_FIN")
        private String BASIC_FIN = "1";
        @JsonProperty("NOTIF_NO")
        private String NOTIF_NO = "1";
    }

    // 子表实体：IT_OPERATION
    @Data
    public static class Operation {
        @JsonProperty("ACTIVITY")
        private String ACTIVITY = "1";
        @JsonProperty("CONTROL_KEY")
        private String CONTROL_KEY = "1";
        @JsonProperty("DESCRIPTION")
        private String DESCRIPTION = "1";
        @JsonProperty("PLANT")
        private String PLANT = "1";
        @JsonProperty("WORK_CNTR")
        private String WORK_CNTR = "1";
        @JsonProperty("PUR_GROUP")
        private String PUR_GROUP = "1";
        @JsonProperty("PURCH_ORG")
        private String PURCH_ORG = "1";
        @JsonProperty("MATL_GROUP")
        private String MATL_GROUP = "1";
        @JsonProperty("STANDARD_TEXT_KEY")
        private String STANDARD_TEXT_KEY = "1";
        @JsonProperty("UNLOAD_PT")
        private String UNLOAD_PT = "1";
        @JsonProperty("GR_RCPT")
        private String GR_RCPT = "1";
        @JsonProperty("VENDOR_NO")
        private String VENDOR_NO = "1";
        @JsonProperty("CALC_KEY")
        private String CALC_KEY = "1";
        @JsonProperty("WORK_ACTIVITY")
        private String WORK_ACTIVITY = "1";
        @JsonProperty("UN_WORK")
        private String UN_WORK = "1";
        @JsonProperty("NUMBER_OF_CAPACITIES")
        private String NUMBER_OF_CAPACITIES = "1";
        @JsonProperty("DURATION_NORMAL")
        private String DURATION_NORMAL = "1";
        @JsonProperty("DURATION_NORMAL_UNIT")
        private String DURATION_NORMAL_UNIT = "1";
    }

    // 子表实体：IT_COMPONENT
    @Data
    public static class Component {
        @JsonProperty("ITEM_NUMBER")
        private String ITEM_NUMBER = "1";
        @JsonProperty("MATERIAL")
        private String MATERIAL = "1";
        @JsonProperty("ACTIVITY")
        private String ACTIVITY = "1";
        @JsonProperty("REQUIREMENT_QUANTITY")
        private String REQUIREMENT_QUANTITY = "1";
        @JsonProperty("LEAD_TIME_OFFSET_OPR")
        private String LEAD_TIME_OFFSET_OPR = "1";
        @JsonProperty("LEAD_TIME_OFFSET_OPR_UNIT")
        private String LEAD_TIME_OFFSET_OPR_UNIT = "1";
        @JsonProperty("GR_RCPT")
        private String GR_RCPT = "1";
        @JsonProperty("UNLOAD_PT")
        private String UNLOAD_PT = "1";
    }

    // 子表实体：IT_TEXT
    @Data
    public static class Text {
        @JsonProperty("ORDERID")
        private String ORDERID = "1";
        @JsonProperty("ACTIVITY")
        private String ACTIVITY = "1";
        @JsonProperty("SUB_ACTIVITY")
        private String SUB_ACTIVITY = "1";
        @JsonProperty("RESERV_NO")
        private String RESERV_NO = "1";
        @JsonProperty("RES_ITEM")
        private String RES_ITEM = "1";
        @JsonProperty("RES_TYPE")
        private String RES_TYPE = "1";
        @JsonProperty("ITEM_NO_OF_PRODUCTION_RESOURCE")
        private String ITEM_NO_OF_PRODUCTION_RESOURCE = "1";
        @JsonProperty("LANGU")
        private String LANGU = "1";
        @JsonProperty("LANGU_ISO")
        private String LANGU_ISO = "1";
        @JsonProperty("TEXTSTART")
        private String TEXTSTART = "1";
        @JsonProperty("TEXTEND")
        private String TEXTEND = "1";
    }

    // 子表实体：IT_TEXT_LINES
    @Data
    public static class TextLines {
        @JsonProperty("TDFORMAT")
        private String TDFORMAT = "1";
        @JsonProperty("TDLINE")
        private String TDLINE = "1";
    }

    // 子表实体：IT_SERVICELINES
    @Data
    public static class ServiceLines {
        @JsonProperty("ACTIVITY")
        private String ACTIVITY = "1";
        @JsonProperty("SRV_LINE")
        private String SRV_LINE = "1";
        @JsonProperty("SHORT_TEXT")
        private String SHORT_TEXT = "1";
        @JsonProperty("QUANTITY")
        private String QUANTITY = "1";
        @JsonProperty("UOM")
        private String UOM = "1";
        @JsonProperty("GROSS_PRICE")
        private String GROSS_PRICE = "1";
        @JsonProperty("GL_ACCOUNT")
        private String GL_ACCOUNT = "1";
    }

    // 子表实体：IT_ESTIMATED_COSTS
    @Data
    public static class EstimatedCosts {
        @JsonProperty("VALUE_CATEGORY")
        private String VALUE_CATEGORY = "1";
        @JsonProperty("COSTS_EST")
        private String COSTS_EST = "1";
        @JsonProperty("CURRENCY")
        private String CURRENCY = "1";
    }

    // 子表实体：IT_CI_AUFK
    @Data
    public static class CiAufk {
        @JsonProperty("ORDERID")
        private String ORDERID = "1";
        @JsonProperty("WXLB")
        private String WXLB = "1";
        @JsonProperty("ZJHLB")
        private String ZJHLB = "1";
        @JsonProperty("ZFYZL")
        private String ZFYZL = "1";
        @JsonProperty("ZWXXZ")
        private String ZWXXZ = "1";
        @JsonProperty("ZPRJID")
        private String ZPRJID = "1";
        @JsonProperty("ZJXBH")
        private String ZJXBH = "1";
        @JsonProperty("RCMS_NDJH")
        private String RCMS_NDJH = "1";
        @JsonProperty("RCMS_NDTXT")
        private String RCMS_NDTXT = "1";
        @JsonProperty("RCMS_NDJE")
        private String RCMS_NDJE = "1";
        @JsonProperty("ZCBSPJ")
        private String ZCBSPJ = "1";
        @JsonProperty("SPCODE")
        private String SPCODE = "1";
    }

    // 子表实体：IT_OBJECTLIST
    @Data
    public static class ObjectList {
        @JsonProperty("COUNTER")
        private String COUNTER = "1";
        @JsonProperty("FUNCT_LOC")
        private String FUNCT_LOC = "1";
        @JsonProperty("EQUIPMENT")
        private String EQUIPMENT = "1";
        @JsonProperty("NOTIF_NO")
        private String NOTIF_NO = "1";
        @JsonProperty("SERIALNO")
        private String SERIALNO = "1";
        @JsonProperty("SERMAT")
        private String SERMAT = "1";
        @JsonProperty("DESCRIPTN")
        private String DESCRIPTN = "1";
        @JsonProperty("EQUIDESCR")
        private String EQUIDESCR = "1";
        @JsonProperty("FUNCLDESCR")
        private String FUNCLDESCR = "1";
        @JsonProperty("MATL_DESC")
        private String MATL_DESC = "1";
        @JsonProperty("SHORT_TEXT")
        private String SHORT_TEXT = "1";
        @JsonProperty("FUNCLOC_DISP")
        private String FUNCLOC_DISP = "1";
        @JsonProperty("SORTFIELD")
        private String SORTFIELD = "1";
        @JsonProperty("PROCESSING_IND")
        private String PROCESSING_IND = "1";
        @JsonProperty("ASSEMBLY")
        private String ASSEMBLY = "1";
    }

    // 主请求字段（全大写映射）
    @JsonProperty("IS_MSG_HEAD")
    private IsMsgHead IS_MSG_HEAD = new IsMsgHead();
    @JsonProperty("IV_IWERK")
    private String IV_IWERK = "1";
    @JsonProperty("IV_BNAME")
    private String IV_BNAME = "1";
    @JsonProperty("IV_RELEASE")
    private String IV_RELEASE = "1";
    @JsonProperty("IV_POSID")
    private String IV_POSID = "1";
    @JsonProperty("IV_MODE")
    private String IV_MODE = "C";
    @JsonProperty("IT_METHODS")
    private List<Methods> IT_METHODS = new ArrayList<Methods>() {{ add(new Methods()); }};
    @JsonProperty("IT_HEADER")
    private List<Header> IT_HEADER = new ArrayList<Header>() {{ add(new Header()); }};
    @JsonProperty("IT_OPERATION")
    private List<Operation> IT_OPERATION = new ArrayList<Operation>() {{ add(new Operation()); }};
    @JsonProperty("IT_COMPONENT")
    private List<Component> IT_COMPONENT = new ArrayList<Component>() {{ add(new Component()); }};
    @JsonProperty("IT_TEXT")
    private List<Text> IT_TEXT = new ArrayList<Text>() {{ add(new Text()); }};
    @JsonProperty("IT_TEXT_LINES")
    private List<TextLines> IT_TEXT_LINES = new ArrayList<TextLines>() {{ add(new TextLines()); }};
    @JsonProperty("IT_SERVICELINES")
    private List<ServiceLines> IT_SERVICELINES = new ArrayList<ServiceLines>() {{ add(new ServiceLines()); }};
    @JsonProperty("IT_ESTIMATED_COSTS")
    private List<EstimatedCosts> IT_ESTIMATED_COSTS = new ArrayList<EstimatedCosts>() {{ add(new EstimatedCosts()); }};
    @JsonProperty("IT_CI_AUFK")
    private List<CiAufk> IT_CI_AUFK = new ArrayList<CiAufk>() {{ add(new CiAufk()); }};
    @JsonProperty("IT_OBJECTLIST")
    private List<ObjectList> IT_OBJECTLIST = new ArrayList<ObjectList>() {{ add(new ObjectList()); }};
}